class OuterClass{
    public int a1=1;
    private int a2=2;
    public static int a3=3;
    class InnterClass{
        //实例内部类可以直接访问外部类的成员
        public int a1=111111111;
        public int a4=4;
        private int a5=5;
        public static final int a6=6;
        public void fun(){
            OuterClass outerClass=new OuterClass();
            System.out.println(a1);
            System.out.println(outerClass.a1);//访问外部类的成员变量
            System.out.println(OuterClass.this.a1);//访问外部类的成员变量
            System.out.println(a2);
            System.out.println(a3);
            System.out.println(a4);
            System.out.println(a5);
            System.out.println(a6);
        }
    }
}
public class Test {
    public static void main(String[] args) {
  OuterClass outerClass=new OuterClass();
  OuterClass.InnterClass innterClass=outerClass.new InnterClass();
  innterClass.fun();
    }
}
